-- GENERATED SPELL FOR [Ghostly Philanthropist] --


function spell0_16470(pUnit, Event) --@Ill Gift,n/a--
pUnit:FullCastSpellOnTarget(29609,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16470', 1000, 1)
end

function spell1_16470(pUnit, Event) --@Incite Rage,n/a--
pUnit:FullCastSpellOnTarget(29612,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_16470', 6295, 1)
end

function Sorts_16470(pUnit, Event)
local choix_sorts_16470 = math.random(0, 1)
if choix_sorts_16470 == 0 then
pUnit:RegisterEvent('spell0_16470', 1, 1)
end
if choix_sorts_16470 == 1 then
pUnit:RegisterEvent('spell1_16470', 1, 1)
end
end

function mob16470_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_16470', math.random(1500, 3000), 1)
end

function mob16470_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16470_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob16470_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(16470, 1, 'mob16470_Action')
RegisterUnitEvent(16470, 2, 'mob16470_Leave')
RegisterUnitEvent(16470, 3, 'mob16470_Kill')
RegisterUnitEvent(16470, 4, 'mob16470_Die')
